package com.cavasmonitor.to;

public class UsuarioTo {

	public static enum Rol {

		ADMINISTRADOR(1L), CONSULTA(2L);

		private Long id;

		Rol(Long id) {
			this.id = id;
		}

		public  Long getId() {
			return this.id;
		}
		
		public static Rol getRol(Long id) {
						
			Rol rol = null;
			
			switch (id.intValue()) {
			case 1:
				rol =  Rol.ADMINISTRADOR;
				break;
			case 2:
				rol = Rol.CONSULTA;
				break;
			}
			
			return rol;
		}

	}

	private Long id;
	private String nombre;
	private String pass;
	private Rol rol;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getNombre() {
		return nombre;
	}

	public void setNombre(String nombre) {
		this.nombre = nombre;
	}

	public String getPass() {
		return pass;
	}

	public void setPass(String pass) {
		this.pass = pass;
	}

	public Rol getRol() {
		return rol;
	}

	public void setRol(Rol rol) {
		this.rol = rol;
	}
}
